
require('core-js/features/object/define-property')
require('core-js/features/object/create')
require('core-js/features/object/assign')
require('core-js/features/array/for-each')
require('core-js/features/array/index-of')
// require('core-js/features/array/map')
require('core-js/features/function/bind')
require('core-js/features/promise')

import Vue from 'vue';
import './styles/iconfont.css';
import './styles/index.scss';
import ElementUI from './element-ui.js'
import 'element-ui/lib/theme-chalk/index.css'
import RsMenu from './components/RsMenu'
import RsTabBar from './components/RsTabBar'
import RsWrap from './components/RsWrap'
import RsIconPicker from './components/RsIconPicker'
import RsTreeEdit from './components/RsTreeEdit'
import RsPagination from './components/RsPagination'
import RsSplit from './components/RsSplit'
import RsScrollbar from './components/RsScrollbar'
import RsDict from './components/RsDict'

import ElDragDialog from './directive/drag-dialog'
import RsResize from './directive/resize'

import mavonEditor from 'mavon-editor'
//import 'mavon-editor/dist/css/index.css'
import 'github-markdown-css/github-markdown.css'
Vue.use(mavonEditor)

import App from './app.vue';
import router from "./router";
import Cookies from 'js-cookie';
import store from './store';
import {initRequest} from './utils/request';

const request = initRequest(Vue,router);

//console.log(router)
//console.log(store.getters.size)
//不加这一句，chrome浏览器就算安装了vue插件，也无法在控制台上显示出来
Vue.config.devtools = true;
Vue.use(RsMenu);
Vue.use(RsTabBar);
Vue.use(RsWrap);
Vue.use(RsIconPicker);
Vue.use(RsTreeEdit);
Vue.use(RsPagination);
Vue.use(RsSplit);
Vue.use(RsScrollbar);
Vue.use(RsDict);

Vue.use(ElDragDialog);
Vue.use(RsResize);

Vue.use(ElementUI,{
    size: Cookies.get('size') || 'small', // set element-ui default size
});
Vue.prototype.$req = request.service;
Vue.prototype.$axios = request.axios;

window.vue = new Vue({
    el: '#app',
    router,
    store,
    render: (h) => h(App)
});